import request from '@/utils/request'

// 查询用户实名认证状态
export const checkIdcardAuth = (userId) => {
  return request({
    url: '/indiv/check_idcard_auth',
    method: 'get',
    params: { user_id: userId }
  })
}

// 获取七牛云上传Token
export const getQiniuToken = () => {
  return request({
    url: '/indiv/get_token',
    method: 'get'
  })
}

// 身份证OCR识别
export const recognizeIdCard = (picurl, userId) => {
  return request({
    url: '/indiv/baiduAPICard',
    method: 'post',
    data: { picurl, user_id: userId }
  })
}

// 提交实名认证 - 保存身份证信息
export const submitVerify = (data) => {
  return request({
    url: '/indiv/save_idcard_info',
    method: 'post',
    data
  })
}




